public class Cash extends Payment {
    private double cashTendered;

    public Cash(double amount, double cashTendered) {
        super(amount);
        this.cashTendered = cashTendered;
    }

    @Override
    public boolean processPayment() {
        double change = cashTendered - getAmount();
        System.out.println("使用现金支付 $" + getAmount() + ", 找零 $" + change);
        return true;
    }
}